﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Douban.API.Request
{
    public class SearchMovieRequest : APIRequest<Response.SearchMovieResponse>
    {
        public string Query { get; set; }

        public int PageIndex { get; set; }

        public int PageSize { get; set; }

        public SearchMovieRequest()
        {
            base.Path = "movie/search";
        }

        public override IDictionary<string, string> GetParameters()
        {
            IDictionary<string, string> parameters = new Dictionary<string, string>();
            parameters.Add("q", Query);
            parameters.Add("start", PageIndex.ToString());
            parameters.Add("count", PageSize.ToString());
            return parameters;
        }
    }
}
